package prefuse.tp.svn;

import prefuse.Constants;
import prefuse.render.AbstractShapeRenderer;
import prefuse.render.LabelRenderer;
import prefuse.visual.VisualItem;

/**
 * Set node
 */
public class GraphRadial_nodeRenderer extends LabelRenderer {
	
	public GraphRadial_nodeRenderer(String m_label){
		super(m_label);
        setRenderType(AbstractShapeRenderer.RENDER_TYPE_DRAW_AND_FILL);
        System.out.println(AbstractShapeRenderer.RENDER_TYPE_DRAW_AND_FILL);
        setHorizontalAlignment(Constants.CENTER);
        setRoundedCorner(10,20);
        setManageBounds(true);
	}
	
    protected String getText(VisualItem item) {
    	
        String s = null;

        if ( item.getString("Prenom") != null) {
            s = item.getString("Prenom");  
            if ( item.getString("Nom") != null)
            	s+= " " + item.getString("Nom"); 
        }/* else if ( item.canGetString("Intitule") && item.getString("Description") != null) {
            s = item.getString("Intitule");
        }*/ else if ( item.canGetString(m_labelName) ) {
            return item.getString(m_labelName);            
        }
        return s;
    }
}